home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / rexx / broadcast.avm < prev    next >
Text File  |  1994-06-24  |  2KB  |  79 lines

  1. /* to broadcast to interested parties about changes in mailboxes */
  2.  
  3. /* action = 'addtomailbox', 'deletefrommailbox', 'refreshmailbox', 'refreshmailboxentry' */
  4.  
  5. parse arg action mailbox magiccookie .
  6.  
  7. call addlib("rexxsupport.library", 0, -30, 0)
  8.  
  9. /* who are interested?  AVMCALLNOTIFIER, AVMLOGVIEW.#? */
  10.  
  11. ports = upper(show('p'))
  12. numports = words(ports)
  13.  
  14. if action = 'addtomailbox' | action = 'deletefrommailbox' then do
  15.     if showlist('p', 'AVMCALLNOTIFIER') then
  16.         address 'AVMCALLNOTIFIER' action mailbox magiccookie
  17.  
  18.         do i = 1 to numports
  19.           cport = word(ports, i)
  20.           if pos('AVMLOGVIEW', cport) > 0 then do
  21.             address value cport
  22.             ''action mailbox magiccookie
  23.           end
  24.  
  25.           if pos('AVMSCHEDULER.', cport) > 0 then do
  26.             address value cport
  27.             ''action mailbox magiccookie
  28.           end
  29.  
  30.           if pos('AVMSCHEDULERVIEW', cport) > 0 then do
  31.             address value cport
  32.             ''action mailbox magiccookie
  33.           end
  34.         end
  35. end
  36.  
  37. if action = 'refreshmailbox' then do
  38.     if showlist('p', 'AVMCALLNOTIFIER') then
  39.         address 'AVMCALLNOTIFIER' action mailbox
  40.  
  41.         do i = 1 to numports
  42.           cport = word(ports, i)
  43.           if pos('AVMLOGVIEW', cport) > 0 then do
  44.             address value cport
  45.             ''action mailbox
  46.           end
  47.  
  48.           if pos('AVMSCHEDULER.', cport) > 0 then do
  49.             address value cport
  50.             ''action mailbox
  51.           end
  52.  
  53.           if pos('AVMSCHEDULERVIEW', cport) > 0 then do
  54.             address value cport
  55.             ''action mailbox
  56.           end
  57.         end
  58. end
  59.  
  60. if action = 'refreshmailboxentry' then do
  61.         do i = 1 to numports
  62.           cport = word(ports, i)
  63.           if pos('AVMLOGVIEW', cport) > 0 then do
  64.             address value cport
  65.             ''action mailbox magiccookie
  66.           end
  67.  
  68.           if pos('AVMSCHEDULER.', cport) > 0 then do
  69.             address value cport
  70.             ''action mailbox magiccookie
  71.           end
  72.  
  73.           if pos('AVMSCHEDULERVIEW', cport) > 0 then do
  74.             address value cport
  75.             ''action mailbox magiccookie
  76.           end
  77.         end
  78. end
  79.